'''
    report_gen.py

        The report_gen.py module contains functions for generating
        html code for a Transcript and a Degree Audit Report.
        This module requires the student class to provide the necessary
        information for the courses taken and the grades.

'''


import student
import math
import pickle

'''
    export_transcript()

    Using the given student object a transcript is generated and written to
    the provided file name.
'''
def export_transcript(stud, filename):
    trans_file = open(filename,"w")
    trans_file.write(construct_transcript(stud))
    trans_file.close()
    return

'''
    export_dars()

    Using the given student object a degree audit report is generated and
    written to the provided file name.
'''
def export_dars(stud, filename):
    dars_file = open(filename, "w")
    dars_file.write(construct_dars(stud))
    dars_file.close()
    return

'''
    course_in_list()

    Given the list of course IDs, a list of the student_courses
    in the student list is returned.  Useful for determining if the student has
    taken any courses out of a large list of courses.
'''
def course_in_list(course_list, student_list):
    c_list = []
    s_list = student_list[:]
    for course in course_list:
        for s_course in s_list:
            if course == s_course.get_id():
                c_list.append(s_course)
                s_list.remove(s_course)
    return c_list

'''
    construct_dars()

    Given the student object, generates a html file providing information
    about the students courses taken as part of their major and/or minor program.
    Returns a string containing html and css code.
'''
def construct_dars(stud):
    courses = stud.get_courses()
    src_string = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><title>Degree Audit | Computer Science</title><!-- title of the page --><style type=\"text/css\">body{margin:0;padding:0;}#wrapall{margin:0 auto;padding:0;width:800px;}#content{float:left;clear:both;width:800px;margin-top:50px;}#header-wrap{float:left;clear:both;width:800px;}#header-title{float:left;clear:both;width:800px;margin-top:10px;height:30px;text-align:center;font-size:20px;font-weight:bold;}#header-info{float:right;clear:both;width:350px;margin-top:20px;height:80px;font-size:16px;}#year{float:left;width:760px;margin:0 20px 20px;background-color:#CCC;padding:10px;}#year-title{float:left;clear:both;width:760px;text-align:center;font-weight:bold;font-size:14px;}#year-title-2{float:left;clear:both;width:760px;text-align:center;font-weight:bold;font-size:12px;margin-top:10px;}#year-info{float:left;clear:both;width:760px;font-size:14px;margin-top:20px;}#year-info-row{float:left;clear:both;width:760px;height:20px;line-height:20px;}.special-row{text-decoration:underline;margin-bottom:5px;}.special-row-2{margin-top:20px;text-decoration:underline;margin-bottom:5px;}#year-info-col1{float:left;clear:both;width:100px;height:20px;}#year-info-col2{float:left;width:300px;height:20px;}#year-info-col3{float:left;width:100px;height:20px;text-align:right;}h3{float:left;clear:both;font-size:18px;margin:0;padding:0;}p{float:left;clear:both;margin: 15px 20px 0;padding:0;}#section{float:left;clear:both;width:760px;margin:0 20px 20px;padding:10px;}#section-title{float:left;clear:both;font-weight:bold;margin-top: 10px;}#section ol{float:left;clear:both;margin: 15px 40px 0;padding:0;}#section ol li{margin-bottom: 5px;}#section-info-row{float:left;clear:both;width:760px;height:20px;line-height:20px;margin-bottom:3px;}.section-special-row{text-decoration:underline;margin-bottom:5px;}.section-special-row-2{padding-bottom:20px;}.section-special-row-3{padding-bottom:10px;text-decoration:underline;}#section-info-col1{float:left;clear:both;width:30px;height:20px;}#section-info-col2{float:left;width:470px;height:20px;}#section-info-col3{float:left;width:100px;height:20px;text-align:right;}#questions{float:left;clear:both;margin-top:30px;}#questions a{clear:both;float:left;}#answers{float:left;clear:both;margin-top:30px;}.answer{margin-bottom: 20px;}</style></head><body><div id=\"wrapall\"><!-- wrappall start --><div id=\"header-wrap\"><!-- header-wrap start --><div id=\"header-title\"><!-- header-title start -->Degree Audit</div><!-- header-title end -->"
    #GEP START
    src_string += "<!-- GEP START --><h3>General Education Program</h3><div id=\"section\"><!-- section start --><div id=\"section-title\">A. Graduation Requirements</div><ol><li>Completion of a minimum of 120 academic credits</li><li>A minimum cumulative grade point average of 2.00</li><li>Two activity courses in physical education:</li><div id=\"section-info-row\" class=\"section-special-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\"></div><div id=\"section-info-col3\">Taken</div><div id=\"section-info-col3\">Grade</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">a.</div><div id=\"section-info-col2\">"
    A3_IDS = ["PHED 100", "PHED 101", "PHED 102", "PHED 103", "PHED 104"]
    a3_list = course_in_list(A3_IDS, stud.get_courses())
    #A.3.a
    if len(a3_list) > 0:
        src_string += a3_list[0].get_id()
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "Y"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += a3_list[0].get_grade()
    else:
        src_string += "______________"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
    src_string += "</div></div><div id=\"section-info-row\" class=\"section-special-row-2\"><div id=\"section-info-col1\">b.</div><div id=\"section-info-col2\">"
    #A.3.b
    if len(a3_list) > 1:
        src_string += a3_list[1].get_id()
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "Y"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += a3_list[1].get_grade()
    else:
        src_string += "______________"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
    src_string += "</div></div><div id=\"section-info-row\" class=\"section-special-row-3\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">Courses that can satisfy this requirement:</div><div id=\"section-info-col3\"></div><div id=\"section-info-col3\"></div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">PHED 100 - Physical Education 100</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">PHED 101 - Physical Education 101</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">PHED 102 - Physical Education 102</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">PHED 103 - Physical Education 103</div> </div><div id=\"section-info-row\" class=\"section-special-row-2\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">PHED 104 - Physical Education 104</div></div><li>Completion of the general education program, outlined below.</li><li>45 credits of upper-level courses numbered at the 300 or 400 level.</li><li>Completion of an academic major.</li></ol></div><!-- section end --><div id=\"section\"><!-- section start --><div id=\"section-title\">B. General Education Program</div><p>All areas listed below must be completed as specified.</p><ol><li>English Composition: Completion of ENGL 100</li><div id=\"section-info-row\" class=\"section-special-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\"></div><div id=\"section-info-col3\">Taken</div><div id=\"section-info-col3\">Grade</div></div><div id=\"section-info-row\" class=\"section-special-row-2\"><div id=\"section-info-col1\">a.</div><div id=\"section-info-col2\">ENGL 100 - English Composition</div><div id=\"section-info-col3\">"
    #B.1
    B1_IDS = ["ENGL 100"]
    b1_list = course_in_list(B1_IDS, stud.get_courses())
    if len(b1_list) > 0:
        src_string += "Y"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += b1_list[0].get_grade()
    else:
        src_string += "--"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
    src_string += "</div></div><li>Arts/Humanites: Three courses with \"AH\" designation; courses must come from at least two different academic disciplines.</li><div id=\"section-info-row\" class=\"section-special-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\"></div><div id=\"section-info-col3\">Taken</div><div id=\"section-info-col3\">Grade</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">a.</div><div id=\"section-info-col2\">"
    B2_IDS = ["AH 100", "AH 101", "AH 102", "AH 103", "AH 104", "AH 105", "AH 200", "AH 201", "AH 202", "AH 203"]
    b2_list = course_in_list(B2_IDS, stud.get_courses())
    #B.2.a
    if len(b2_list) > 0:
        src_string += b2_list[0].get_id()
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "Y"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += b2_list[0].get_grade()
    else:
        src_string += "______________"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
    src_string += "</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">b.</div><div id=\"section-info-col2\">"
    #B.2.b
    if len(b2_list) > 1:
        src_string += b2_list[1].get_id()
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "Y"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += b2_list[1].get_grade()
    else:
        src_string += "______________"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
    src_string += "</div></div><div id=\"section-info-row\" class=\"section-special-row-2\"><div id=\"section-info-col1\">c.</div><div id=\"section-info-col2\">"
    #B.2.b
    if len(b2_list) > 2:
        src_string += b2_list[2].get_id()
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "Y"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += b2_list[2].get_grade()
    else:
        src_string += "______________"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"

    src_string += "</div></div><div id=\"section-info-row\" class=\"section-special-row-3\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">Courses that can satisfy this requirement:</div><div id=\"section-info-col3\"></div><div id=\"section-info-col3\"></div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">AH 100 - Arts and Humanities 100</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">AH 101 - Arts and Humanities 101</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">AH 102 - Arts and Humanities 102</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">AH 103 - Arts and Humanities 103</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">AH 104 - Arts and Humanities 104</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">AH 105 - Arts and Humanities 105</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">AH 200 - Arts and Humanities 200</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">AH 201 - Arts and Humanities 201</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">AH 202 - Arts and Humanities 202</div></div><div id=\"section-info-row\" class=\"section-special-row-2\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">AH 203 - Arts and Humanities 203</div></div><li>Social Sciences: Three courses with \"SS\" designation; courses must come from at least two different academic disciplines.</li><div id=\"section-info-row\" class=\"section-special-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\"></div><div id=\"section-info-col3\">Taken</div><div id=\"section-info-col3\">Grade</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">a.</div><div id=\"section-info-col2\">"
    B3_IDS = ["SS 100", "SS 101", "SS 102", "SS 103", "SS 104", "SS 105", "SS 200", "SS 201", "SS 202", "SS 203"]
    b3_list = course_in_list(B3_IDS, stud.get_courses())
    #B.3.a
    if len(b3_list) > 0:
        src_string += b3_list[0].get_id()
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "Y"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += b3_list[0].get_grade()
    else:
        src_string += "______________"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
    src_string += "</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">b.</div><div id=\"section-info-col2\">"
    #B.3.b
    if len(b3_list) > 1:
        src_string += b3_list[1].get_id()
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "Y"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += b3_list[1].get_grade()
    else:
        src_string += "______________"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
    src_string += "</div></div><div id=\"section-info-row\" class=\"section-special-row-2\"><div id=\"section-info-col1\">c.</div><div id=\"section-info-col2\">"
    #B.3.c
    if len(b3_list) > 2:
        src_string += b3_list[2].get_id()
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "Y"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += b3_list[2].get_grade()
    else:
        src_string += "______________"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"

    src_string += "</div></div><div id=\"section-info-row\" class=\"section-special-row-3\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">Courses that can satisfy this requirement:</div><div id=\"section-info-col3\"></div><div id=\"section-info-col3\"></div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SS 100 - Social Science 100</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SS 101 - Social Science 101</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SS 102 - Social Science 102</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SS 103 - Social Science 103</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SS 104 - Social Science 104</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SS 105 - Social Science 105</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SS 200 - Social Science 200</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SS 201 - Social Science 201</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SS 202 - Social Science 202</div></div><div id=\"section-info-row\" class=\"section-special-row-2\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SS 202 - Social Science 202</div></div><li>Mathematics: One course in mathematics or statistics with the \"M\" designation.</li><div id=\"section-info-row\" class=\"section-special-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\"></div><div id=\"section-info-col3\">Taken</div><div id=\"section-info-col3\">Grade</div></div><div id=\"section-info-row\" class=\"section-special-row-2\"><div id=\"section-info-col1\">a.</div><div id=\"section-info-col2\">"
    B4_IDS = ["MATH 100", "MATH 101", "MATH 102", "MATH 103", "MATH 104", "STAT 100", "STAT 101", "STAT 102", "STAT 103", "STAT 104"]
    b4_list = course_in_list(B4_IDS, stud.get_courses())
    #B.4.a
    if len(b4_list) > 0:
        src_string += b4_list[0].get_id()
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "Y"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += b4_list[0].get_grade()
    else:
        src_string += "______________"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"

    src_string += "</div></div><div id=\"section-info-row\" class=\"section-special-row-3\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">Courses that can satisfy this requirement:</div><div id=\"section-info-col3\"></div><div id=\"section-info-col3\"></div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">MATH 100 - Mathematics 100</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">MATH 101 - Mathematics 101</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">MATH 102 - Mathematics 102</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">MATH 103 - Mathematics 103</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">MATH 104 - Mathematics 104</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">STAT 100 - Statistics 100</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">STAT 101 - Statistics 101</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">STAT 102 - Statistics 102</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">STAT 103 - Statistics 103</div></div><div id=\"section-info-row\" class=\"section-special-row-2\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">STAT 104 - Statistics 104</div></div><li>Sciences: Two courses with \"S\" designation. At least one science course must include a laboratory component, either as an integral part of a course or as a separate course with an \"L\" after the course number.</li><div id=\"section-info-row\" class=\"section-special-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\"></div><div id=\"section-info-col3\">Taken</div><div id=\"section-info-col3\">Grade</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">a.</div><div id=\"section-info-col2\">"
    B5_IDS = ["SCI 100", "SCI 101", "SCI 102", "SCI 103", "SCI 104", "SCI 104L", "SCI 105", "SCI 105L", "SCI 106", "SCI 106L"]
    b5_list = course_in_list(B5_IDS, stud.get_courses())
    #B.5.a
    if len(b5_list) > 0:
        src_string += b5_list[0].get_id()
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "Y"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += b5_list[0].get_grade()
    else:
        src_string += "______________"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
    src_string += "</div></div><div id=\"section-info-row\" class=\"section-special-row-2\"><div id=\"section-info-col1\">b.</div><div id=\"section-info-col2\">"
    #B.5.b
    if len(b5_list) > 1:
        src_string += b5_list[1].get_id()
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "Y"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += b5_list[1].get_grade()
    else:
        src_string += "______________"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"

    src_string += "</div></div><div id=\"section-info-row\" class=\"section-special-row-3\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">Courses that can satisfy this requirement:</div><div id=\"section-info-col3\"></div><div id=\"section-info-col3\"></div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SCI 100 - Science (Lecture, Discussion + Lab) 100</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SCI 101 - Science (Lecture, Discussion + Lab) 101</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SCI 102 - Science (Lecture, Discussion + Lab) 102</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SCI 103 - Science (Lecture, Discussion + Lab) 103</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SCI 104 - Science (Lecture + Discussion) 104</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SCI 104L - Science (Lab) 104</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SCI 105 - Science (Lecture + Discussion) 105</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SCI 105L - Science (Lab) 105</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SCI 106 - Science (Lecture + Discussion) 106</div></div><div id=\"section-info-row\" class=\"section-special-row-2\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">SCI 106L - Science (Lab) 106</div></div><li>Culture: Two courses with a \"C\" designation.</li><div id=\"section-info-row\" class=\"section-special-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\"></div><div id=\"section-info-col3\">Taken</div><div id=\"section-info-col3\">Grade</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">a.</div><div id=\"section-info-col2\">"
    B6_IDS = ["CULT 100", "CULT 101", "CULT 102", "CULT 103", "CULT 104", "CULT 104L", "CULT 105"]
    b6_list = course_in_list(B6_IDS, stud.get_courses())
    #B.6.a
    if len(b6_list) > 0:
        src_string += b6_list[0].get_id()
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "Y"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += b6_list[0].get_grade()
    else:
        src_string += "______________"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
    src_string += "</div></div><div id=\"section-info-row\" class=\"section-special-row-2\"><div id=\"section-info-col1\">b.</div><div id=\"section-info-col2\">"
    #B.6.b
    if len(b6_list) > 1:
        src_string += b6_list[1].get_id()
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "Y"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += b6_list[1].get_grade()
    else:
        src_string += "______________"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"

    src_string += "</div></div><div id=\"section-info-row\" class=\"section-special-row-3\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">Courses that can satisfy this requirement:</div><div id=\"section-info-col3\"></div><div id=\"section-info-col3\"></div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">CULT 100 - Culture 100</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">CULT 101 - Culture 101</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">CULT 102 - Culture 102</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">CULT 103 - Culture 103</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">CULT 104 - Culture 104</div></div><div id=\"section-info-row\" class=\"section-special-row-2\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">CULT 105 - Culture 105</div></div><li>Language: Completion of a foreign language through the 201 level or demostrated proficiency at that level.</li><div id=\"section-info-row\" class=\"section-special-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\"></div><div id=\"section-info-col3\">Taken</div><div id=\"section-info-col3\">Grade</div></div><div id=\"section-info-row\" class=\"section-special-row-2\"><div id=\"section-info-col1\">a.</div><div id=\"section-info-col2\">LANG 201 - Foreign Language 201</div><div id=\"section-info-col3\">"
    #B.7
    B7_IDS = ["LANG 201"]
    b7_list = course_in_list(B7_IDS, stud.get_courses())
    if len(b7_list) > 0:
        src_string += "Y"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += b7_list[0].get_grade()
    else:
        src_string += "--"
        src_string += "</div><div id=\"section-info-col3\">"
        src_string += "--"
    src_string += "</div></div></ol></div><!-- section end --><div id=\"section\"><!-- section start --><div id=\"section-title\">C. Additional Requirements</div><ol><li>All courses used to satisfy the general education program requirements must be completed with a \"C\" or better. Courses taken on a pass/fail basis may not be used toward general education program requirements.</li><li>Within the general education program requirements, no one course may be used to satisfy more than one area. Therefore if a course has been approved \"AH\" or \"C\" it may be used to satisfy either one, but not both, of these areas.</li><li>No more than two courses from the same discipline may be used to satisfy either the arts/humanities or social science areas. No more than three courses from the same discipline may be used throughout the general education program requirements.</li></ol></div><!-- section end --><!-- GEP END -->"

    #COMPUTER SCIENCE MAJOR (0:CMSC, 1:IS, 2:CMSC/IS)
    if stud.get_major() != 1:
        src_string += "<!-- CMSC MAJOR START --><h3>Computer Science Major</h3><p>The B.S. in Computer Science is accredited by the Computing Accreditation  Commision of ABET. Students who wish to obtain a Bachelor of Science (B.S.) in Computer Science must satisfy the following requirements.</p><p>A grade of \"C\" or better is necessary for any course to be applied to the computer science major. Students majoring in computer science must have a grade of \"B\" or better in both CMSC 201 and CMSC 202 as well as completing all the prerequisites for CMSC 341 before registering for CMSC 341.</p><div id=\"section\"><div id=\"section-title\">A. Required Computer Science Courses</div><div id=\"section-info-row\" class=\"section-special-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\"></div><div id=\"section-info-col3\">Taken</div><div id=\"section-info-col3\">Grade</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">1.</div><div id=\"section-info-col2\">CMSC 201/201H - Computer Science I</div><div id=\"section-info-col3\">"
        #CMSC-A.1
        CA1_IDS = ["CMSC 201", "CMSC 201H"]
        ca1_list = course_in_list(CA1_IDS, stud.get_courses())
        if len(ca1_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ca1_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        src_string += "</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">2.</div><div id=\"section-info-col2\">CMSC 202/202H - Computer Science II</div><div id=\"section-info-col3\">"
        #CMSC-A.2
        CA2_IDS = ["CMSC 202", "CMSC 202H"]
        ca2_list = course_in_list(CA2_IDS, stud.get_courses())
        if len(ca2_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ca2_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        src_string += "</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">3.</div><div id=\"section-info-col2\">CMSC 203 - Discrete Structures</div><div id=\"section-info-col3\">"
        #CMSC-A.3
        CA3_IDS = ["CMSC 203"]
        ca3_list = course_in_list(CA3_IDS, stud.get_courses())
        if len(ca3_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ca3_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        src_string += "</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">4.</div><div id=\"section-info-col2\">CMSC 304 - Ethical and Social Issues in Information Technology</div><div id=\"section-info-col3\">"

        #CMSC-A.4
        CA4_IDS = ["CMSC 304"]
        ca4_list = course_in_list(CA4_IDS, stud.get_courses())
        if len(ca4_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ca4_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        
        src_string += "</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">5.</div><div id=\"section-info-col2\">CMSC 313 - Computer Organization and Assembly Language <!--Programming--></div><div id=\"section-info-col3\">"
        #CMSC-A.5
        CA5_IDS = ["CMSC 313"]
        ca5_list = course_in_list(CA5_IDS, stud.get_courses())
        if len(ca5_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ca5_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
                       	
        src_string += "</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">6.</div><div id=\"section-info-col2\">CMSC 331 - Principles of Programming Languages</div><div id=\"section-info-col3\">"
        #CMSC-A.6
        CA6_IDS = ["CMSC 331"]
        ca6_list = course_in_list(CA6_IDS, stud.get_courses())
        if len(ca6_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ca6_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        
        src_string += "</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">7.</div><div id=\"section-info-col2\">CMSC 341/341H - Data Structures</div><div id=\"section-info-col3\">"
        #CMSC-A.7
        CA7_IDS = ["CMSC 341", "CMSC 341H"]
        ca7_list = course_in_list(CA7_IDS, stud.get_courses())
        if len(ca7_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ca7_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        
        src_string += "</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">8.</div><div id=\"section-info-col2\">CMSC 345 - Software Design and Development</div><div id=\"section-info-col3\">"
        #CMSC-A.8
        CA8_IDS = ["CMSC 345"]
        ca8_list = course_in_list(CA8_IDS, stud.get_courses())
        if len(ca8_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ca8_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            
        src_string += "</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">9.</div><div id=\"section-info-col2\">CMSC 411 - Computer Architecture</div><div id=\"section-info-col3\">"
        #CMSC-A.9
        CA9_IDS = ["CMSC 411"]
        ca9_list = course_in_list(CA9_IDS, stud.get_courses())
        if len(ca9_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ca9_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            
        src_string += "</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">10.</div><div id=\"section-info-col2\">CMSC 421 - Principles of Operating Systems</div><div id=\"section-info-col3\">"
        #CMSC-A.10
        CA10_IDS = ["CMSC 421"]
        ca10_list = course_in_list(CA10_IDS, stud.get_courses())
        if len(ca10_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ca10_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            
        src_string += "</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">11.</div><div id=\"section-info-col2\">CMSC 441 - Algorithms</div><div id=\"section-info-col3\">"
        #CMSC-A.6
        CA11_IDS = ["CMSC 441"]
        ca11_list = course_in_list(CA11_IDS, stud.get_courses())
        if len(ca11_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ca11_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        src_string += "</div></div></div><div id=\"section\"><div id=\"section-title\">B. Required Math Courses</div><div id=\"section-info-row\" class=\"section-special-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\"></div><div id=\"section-info-col3\">Taken</div><div id=\"section-info-col3\">Grade</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">1.</div><div id=\"section-info-col2\">MATH 151 - Calculus and Analytic Geometry I</div><div id=\"section-info-col3\">"
        #CMSC-B.1
        CB1_IDS = ["MATH 151"]
        cb1_list = course_in_list(CB1_IDS, stud.get_courses())
        if len(cb1_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += cb1_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        src_string += "</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">2.</div><div id=\"section-info-col2\">MATH 152 - Calculus and Analytic Geometry II</div><div id=\"section-info-col3\">"
        #CMSC-B.2
        CB2_IDS = ["MATH 152"]
        cb2_list = course_in_list(CB2_IDS, stud.get_courses())
        if len(cb2_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += cb2_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        src_string += "</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\">3.</div><div id=\"section-info-col2\">MATH 221 - Linear Algebra</div><div id=\"section-info-col3\">"
        #CMSC-B.3
        CB3_IDS = ["MATH 221"]
        cb3_list = course_in_list(CB3_IDS, stud.get_courses())
        if len(cb3_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += cb3_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        src_string += "</div></div></div><div id=\"section\"><div id=\"section-title\">C. Required Statistics Course</div><div id=\"section-info-row\"class=\"section-special-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> </div> <div id=\"section-info-col3\"> Taken </div> <div id=\"section-info-col3\"> Grade </div> </div> 	<div id=\"section-info-row\"> <div 	id=\"section-info-col1\"> 1.  </div> <div 	id=\"section-info-col2\"> STAT 355 - 	Introduction to Probability and Statistics 	</div> <div id=\"section-info-col3\">"
        #CMSC-C.1
        CC1_IDS = ["STAT 355"]
        cc1_list = course_in_list(CC1_IDS, stud.get_courses())
        if len(cc1_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += cc1_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        src_string += "</div> </div></div> <div id=\"section\"><div id=\"section-title\"> D. Required Science Courses 	</div> <p>Computer science majors must take 12 credits in science courses. Two courses must be from one of the following sequences:</p> <div id=\"section-info-row\" 	class=\"section-special-row\"> <div 	id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> </div> <div 	id=\"section-info-col3\"> </div> <div 	id=\"section-info-col3\"> </div> </div> <div 	id=\"section-info-row\"> <div 	id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> BIOL 100 - Concepts 	of Biology </div> </div> <div 	id=\"section-info-row\"> <div 	id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> BIOL 301 - Ecology 	and Evolution </div> </div> <div 	id=\"section-info-row\"> <div 	id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> OR </div> </div> 	<div id=\"section-info-row\"> <div 	id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> BIOL 141 - 	Foundations of Biology: Cells, Energy and 	Organisms </div> </div> <div 	id=\"section-info-row\"> <div 	id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> BIOL 142 - 	Foundations of Biology: Ecology and Evolution 	</div> </div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> OR </div> </div> 	<div id=\"section-info-row\"> <div 	id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> CHEM 101 - 	Principles of Chemistry I </div> </div> <div 	id=\"section-info-row\"> <div 	id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> CHEM 102 - 	Principles of Chemistry II </div> </div> <div 	id=\"section-info-row\"> <div 	id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> OR </div> </div> 	<div id=\"section-info-row\"> <div 	id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> PHYS 121 - 	Introductory Physics I </div> </div> <div 	id=\"section-info-row\"> <div 	id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> PHYS 122 - 	Introductory Physics II </div> </div> <div 	id=\"section-info-row\" 	class=\"section-special-row\"> <div 	id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> </div> <div 	id=\"section-info-col3\"> Taken </div> <div 	id=\"section-info-col3\"> Grade </div> </div> 	<div id=\"section-info-row\"> <div 	id=\"section-info-col1\"> a.  </div> <div 	id=\"section-info-col2\">" 
        #C.D.1
        SCI1 = ["BIOL 100", "BIOL 301"]
        SCI2 = ["BIOL 141", "BIOL 142"]
        SCI3 = ["BIOL 101", "BIOL 102"]
        SCI4 = ["BIOL 121", "BIOL 122"]
        cd1_list = course_in_list(SCI1, stud.get_courses())
        if len(cd1_list) < 2:
            cd1_list = course_in_list(SCI2, stud.get_courses())
            if len(cd1_list) < 2:
                cd1_list = course_in_list(SCI3, stud.get_courses())
                if len(cd1_list) < 2:
                    cd1_list = course_in_list(SCI4, stud.get_courses())
                    if len(cd1_list) < 2:
                        cd1_list = []
        if len(cd1_list) == 2:
            src_string += cd1_list[0].get_id()
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += cd1_list[0].get_grade()
            src_string += "</div> </div> <div id=\"section-info-row\" 	class=\"section-special-row-2\"> <div 	id=\"section-info-col1\"> b.  </div> <div 	id=\"section-info-col2\">"
            src_string += cd1_list[1].get_id()
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += cd1_list[1].get_grade()
        else:
            src_string += "______________"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            src_string += "</div> </div> <div id=\"section-info-row\" 	class=\"section-special-row-2\"> <div 	id=\"section-info-col1\"> b.  </div> <div 	id=\"section-info-col2\">"
            src_string += "______________"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        src_string += "</div> </div> 	<p>One additional course must be a science course from the list of approved science courses below. If additional credits are needed to reach 12 credits in this section, these credits can be earned either by taking additional courses from the science list below, or by taking a course from the list of approved additional math courses below.</p> <p>Approved Science Courses:</p> <p></p> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 100L - </div> 			</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 251 - </div> 			</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 251L - </div> 			</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 252 - </div> 			</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 252L - </div> 			</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 275 - </div> 			</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 275L - </div> 			</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 301 - </div> 			</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 302 - </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 302L - </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 303 - </div> </div> <div id=\"section-info-row\"><div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 303L - </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 304 - </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 304L - </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 305 - </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> BIOL 305L - </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> CHEM 102L - </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> GES 110 - </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> GES 111 - </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> GES 120 - </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> PHYS 122L - </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> PHYS 224 - </div> </div> <p>Approved Additional Mathematics Courses:</p> <p></p> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> MATH 225 - </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> MATH 251 - </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> MATH 301 - </div> </div> <div id=\"section-info-row\" class=\"section-special-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> </div> <div id=\"section-info-col3\"> Taken </div> <div id=\"section-info-col3\"> Grade </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> a.  </div> <div id=\"section-info-col2\">"
        #C.D.2
        CD2_IDS = ["BIOL 100L", "BIOL 251", "BIOL 251L", "BIOL 252", "BIOL 252L", "BIOL 275", "BIOL 275L", "BIOL 301", "BIOL 302", "BIOL 302L", "BIOL 303", "BIOL 303L", "BIOL 304", "BIOL 304L", "BIOL 305", "BIOL 305L", "CHEM 102L", "GES 110", "GES 111", "GES 120", "PHYS 122L", "PHYS 224", "MATH 225", "MATH 251", "MATH 301"]
        cd2_list = course_in_list(B6_IDS, stud.get_courses())
        #C.D.2.a
        if len(cd2_list) > 0:
            src_string += cd2_list[0].get_id()
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += cd2_list[0].get_grade()
        else:
            src_string += "______________"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

    
        src_string += "</div> </div> <div id=\"section-info-row\" class=\"section-special-row-2\"> <div id=\"section-info-col1\"> b.  </div> <div id=\"section-info-col2\">"
        #C.D.2.b
        if len(cd2_list) > 1:
            src_string += cd2_list[1].get_id()
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += cd2_list[1].get_grade()
        else:
            src_string += "______________"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"


        src_string += "</div> </div> </div> <div id=\"section\"> 	<div id=\"section-title\"> E. Two Computer Science 	Electives chosen from: </div> <div id=\"section-info-row\" class=\"section-special-row\"> 	<div id=\"section-info-col1\"> 		</div> 	<div id=\"section-info-col2\"> 	</div> 	<div id=\"section-info-col3\"> </div> <div id=\"section-info-col3\"> </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> CMSC 426 - Principles of Computer Security </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> CMSC 431 - Compiler Design Principles </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> CMSC 435 - Computer Graphics </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> CMSC 445 - Software and Engineering </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> CMSC 451 - Automata Theory and Formal Languages </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> CMSC 455 - Numerical Computations </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> CMSC 456 - Symbolic Computation </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> CMSC 461 - Database Management Systems </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> CMSC 471 - Artificial Intelligence </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> CMSC 481 - Computer Networks </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> CMSC 483 - Parallel and Distributed Processing </div> </div> <div id=\"section-info-row\" class=\"section-special-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> </div> <div id=\"section-info-col3\"> Taken </div> <div id=\"section-info-col3\"> Grade </div> </div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> a.  </div> <div id=\"section-info-col2\">"
        #C.E.a
        CE_IDS = ["CMSC 426", "CMSC 431", "CMSC 435", "CMSC 445", "CMSC 451", "CMSC 455", "CMSC 456", "CMSC 461", "CMSC 471", "CMSC 481", "CMSC 483"]
        ce_list = course_in_list(CE_IDS, stud.get_courses())
        if len(ce_list) > 0:
            src_string += ce_list[0].get_id()
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ce_list[0].get_grade()
        else:
            src_string += "______________"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        src_string += "</div> </div> <div id=\"section-info-row\" class=\"section-special-row-2\"> <div id=\"section-info-col1\"> b.  </div> <div id=\"section-info-col2\">"
        #C.E.b
        if len(ce_list) > 1:
            src_string += ce_list[1].get_id()
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ce_list[1].get_grade()
        else:
            src_string += "______________"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        
        src_string += "</div> </div> </div><div id=\"section\"> 	<div id=\"section-title\"> F. Three Technical 	Electives chosen from (E) or any other 	three-credit CMSC 400-level course, except 	CMSC 404 or CMSC 495-499 </div> <div id=\"section-info-row\" class=\"section-special-row\"> <div id=\"section-info-col1\"> </div> <div id=\"section-info-col2\"> </div> <div id=\"section-info-col3\"> Taken </div> <div id=\"section-info-col3\"> Grade </div> </div> <div 	id=\"section-info-row\"> <div 	id=\"section-info-col1\"> a.  </div> <div 	id=\"section-info-col2\">"
        CF_IDS = ["CMSC 426", "CMSC 431", "CMSC 435", "CMSC 445", "CMSC 451", "CMSC 455", "CMSC 456", "CMSC 461", "CMSC 471", "CMSC 481", "CMSC 483", "MATH 430", "MATH 441", "MATH 452", "MATH 475", "MATH 481", "MATH 483"]
        cf_list = course_in_list(CF_IDS, stud.get_courses())
        for cf_course in cf_list:
            if cf_course in ce_list:
                cf_list.remove(cf_course)
        #C.F.a
        if len(cf_list) > 0:
            src_string += cf_list[0].get_id()
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += cf_list[0].get_grade()
        else:
            src_string += "______________"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        
        src_string += "</div> </div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> b.  </div> <div 	id=\"section-info-col2\">"
        #C.F.b
        if len(cf_list) > 1:
            src_string += cf_list[1].get_id()
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += cf_list[1].get_grade()
        else:
            src_string += "______________"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        
        src_string += "</div> </div> <div id=\"section-info-row\" 	class=\"section-special-row-2\"> <div 	id=\"section-info-col1\"> c.  </div> <div 	id=\"section-info-col2\">"
         #C.F.b
        if len(cf_list) > 2:
            src_string += cf_list[2].get_id()
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += cf_list[2].get_grade()
        else:
            src_string += "______________"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        
        src_string += "</div> </div> <div id=\"section-info-row\" 	class=\"section-special-row-3\"> <div 	id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> Up to two of these 	courses may be chosen from the following list: 	</div> <div id=\"section-info-col3\"> </div> 	<div id=\"section-info-col3\"> </div> </div> 	<div id=\"section-info-row\"> <div 	id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> MATH 430 - Matrix 	Analysis </div> </div> <div 	id=\"section-info-row\"> <div 	id=\"section-info-col1\"> </div> <div 	id=\"section-info-col2\"> MATH 441 - Numerical 	Analysis </div> </div> <div 	id=\"section-info-row\"> <div id=\"section-info-col1\"></div><div id=\"section-info-col2\">MATH 452 - Introduction to Stochastic Processes</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">MATH 475 - Combinatorics and Graph Theory</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">MATH 481 - Mathematical Modeling</div></div><div id=\"section-info-row\"><div id=\"section-info-col1\"></div><div id=\"section-info-col2\">MATH 483 - Linear and Combinatorial Optimization</div></div></div><!-- CMSC MAJOR END -->"

    #INFORMATION SYSTEMS MAJOR (0:CMSC, 1:IS, 2:CMSC/IS)
    if stud.get_major() != 0:
        src_string += "<!-- IS MAJOR START --> <h3>Information Systems Major</h3> <p>Students who wish to obtain a Bachelor of Science (B.S.) degree in Information Systems must satisfy the following requirements.</p> <div id=\"section\"><!-- section start --> 	<div id=\"section-title\">A. General Requirements</div> <ol> 	<li>A grade of C or better for any course to be applied to the information systems major.</li> <li>The fulfillment of the \"gateway\" requirements, section B, before being allowed to continue on to the 400-level IS core courses.</li> </ol> </div><!-- section end --><div id=\"section\"> 	<div id=\"section-title\"> 	B. Information Systems Gateway </div> <p>An average of 3.0 in the following courses:</p> <div id=\"section-info-row\" class=\"section-special-row\"> 	<div id=\"section-info-col1\"> 		</div> 	<div id=\"section-info-col2\"> 	</div> 	<div id=\"section-info-col3\"> 		Taken </div> <div id=\"section-info-col3\"> 	Grade </div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		1.  	</div> <div id=\"section-info-col2\"> 	IS 300 - Management Information Systems </div> <div id=\"section-info-col3\">"
        #IS-B.1
        IB1_IDS = ["IS 300"]
        ib1_list = course_in_list(IB1_IDS, stud.get_courses())
        if len(ib1_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ib1_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

 	
        src_string += "</div></div> <div id=\"section-info-row\"> <div id=\"section-info-col1\">2.</div> <div id=\"section-info-col2\"> 	IS 310 - Software and Hardware Concepts </div> <div id=\"section-info-col3\">"
        #IS-B.2
        IB2_IDS = ["IS 310"]
        ib2_list = course_in_list(IB2_IDS, stud.get_courses())
        if len(ib2_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ib2_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        
        src_string += "</div></div> <p>A grade of \"C\" or better in the following courses:</p> <div id=\"section-info-row\" class=\"section-special-row\"> 	<div id=\"section-info-col1\"> 		</div> 	<div id=\"section-info-col2\"> 	</div> 	<div id=\"section-info-col3\"> 		Taken </div> <div id=\"section-info-col3\"> 	Grade </div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		1.  	</div> <div id=\"section-info-col2\"> 	MATH 155 - Elementary Calculus </div> <div id=\"section-info-col3\">"
        #IS-B.3
        IB3_IDS = ["MATH 155"]
        ib3_list = course_in_list(IB3_IDS, stud.get_courses())
        if len(ib3_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ib3_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        
        src_string += "</div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"></div> <div id=\"section-info-col2\"> 	OR </div> <div id=\"section-info-col3\"></div> <div id=\"section-info-col3\"></div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"></div> <div id=\"section-info-col2\"> 	MATH 151 - </div> <div id=\"section-info-col3\">"
        #IS-B.4
        IB4_IDS = ["MATH 151"]
        ib4_list = course_in_list(IB4_IDS, stud.get_courses())
        if len(ib4_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ib4_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        
 	
        src_string += "</div></div> <div id=\"section-info-row\"> <div id=\"section-info-col1\">2.</div> <div id=\"section-info-col2\">IS 147 - Introduction to Computer Programming </div> <div id=\"section-info-col3\">"
        #IS-B.5
        IB5_IDS = ["IS 147"]
        ib5_list = course_in_list(IB5_IDS, stud.get_courses())
        if len(ib5_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ib5_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        
        src_string += "</div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"></div> <div id=\"section-info-col2\"> 	OR </div> <div id=\"section-info-col3\"></div> <div id=\"section-info-col3\"></div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"></div> <div id=\"section-info-col2\"> 	CMSC 201 - Computer Science I </div> <div id=\"section-info-col3\">"
        #IS-B.6
        IB6_IDS = ["CMSC 201"]
        ib6_list = course_in_list(IB6_IDS, stud.get_courses())
        if len(ib6_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ib6_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        
        src_string += "</div> 	</div> </div> <div id=\"section\"><!-- section start --><div id=\"section-title\">C. Required Information Systems Courses</div> <p>Recommended preparation (not required) for Information Systems (B.S.) courses</p> <div id=\"section-info-row\" class=\"section-special-row\"> 	<div id=\"section-info-col1\"> 		</div> 	<div id=\"section-info-col2\"> 	</div> 	<div id=\"section-info-col3\"> 		Taken </div> <div id=\"section-info-col3\"> 	Grade </div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		1.  	</div> <div id=\"section-info-col2\"> 	IS 101 - </div> <div id=\"section-info-col3\">"
        #IS-C.1
        IC1_IDS = ["IS 101"]
        ic1_list = course_in_list(IC1_IDS, stud.get_courses())
        if len(ic1_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ic1_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        

        src_string += "</div> 	</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> 		2.  	</div> <div id=\"section-info-col2\"> 	CMSC 104 - </div> <div id=\"section-info-col3\">"
        #IS-C.2
        IC2_IDS = ["CMSC 104"]
        ic2_list = course_in_list(IC2_IDS, stud.get_courses())
        if len(ic2_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ic2_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

 	
        src_string += "</div> 	</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> 		3.  	</div> <div id=\"section-info-col2\"> 	MATH 106 - </div> <div id=\"section-info-col3\">"
        #IS-C.3
        IC3_IDS = ["MATH 106"]
        ic3_list = course_in_list(IC3_IDS, stud.get_courses())
        if len(ic3_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ic3_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        
        
        src_string += "</div> 	</div> <p>Required courses</p> <div id=\"section-info-row\" class=\"section-special-row\"> 	<div id=\"section-info-col1\"> 		</div> 	<div id=\"section-info-col2\"> 	</div> 	<div id=\"section-info-col3\"> 		Taken </div> <div id=\"section-info-col3\"> 	Grade </div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		1.  	</div> <div id=\"section-info-col2\"> 	IS 410 - Introduction to Database Design </div> <div id=\"section-info-col3\">"
        #IS-C.4
        IC4_IDS = ["IS 410"]
        ic4_list = course_in_list(IC4_IDS, stud.get_courses())
        if len(ic4_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ic4_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        
        src_string += "</div> 	</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> 		2.  	</div> <div id=\"section-info-col2\"> 	IS 420 - Database Application Development </div> <div id=\"section-info-col3\">"
        #IS-C.5
        IC5_IDS = ["IS 420"]
        ic5_list = course_in_list(IC5_IDS, stud.get_courses())
        if len(ic5_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ic5_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
 	
        
        src_string += "</div> 	</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> 		3.  	</div> <div id=\"section-info-col2\"> 	IS 425 - Decision Support Systems </div> <div id=\"section-info-col3\">"
        #IS-C.6
        IC6_IDS = ["IS 425"]
        ic6_list = course_in_list(IC6_IDS, stud.get_courses())
        if len(ic6_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ic6_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        
        src_string += "</div> 	</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> 		4.  	</div> <div id=\"section-info-col2\"> 	IS 436 - Structured Systems Analysis and Design </div> <div id=\"section-info-col3\">"
        #IS-C.7
        IC7_IDS = ["IS 436"]
        ic7_list = course_in_list(IC7_IDS, stud.get_courses())
        if len(ic7_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ic7_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        
        src_string += "</div> 	</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> 		5.  	</div> <div id=\"section-info-col2\"> 	IS 450 - Data Communications and Networks </div> <div id=\"section-info-col3\">"
        #IS-C.8
        IC8_IDS = ["IS 450"]
        ic8_list = course_in_list(IC8_IDS, stud.get_courses())
        if len(ic8_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ic8_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        
        src_string += "</div> 	</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> 		6.  	</div> <div id=\"section-info-col2\"> 	IS 451 - Network Design and Management </div> <div id=\"section-info-col3\">"
        #IS-C.9
        IC9_IDS = ["IS 451"]
        ic9_list = course_in_list(IC9_IDS, stud.get_courses())
        if len(ic9_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ic9_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        
        src_string += "</div> 	</div> <p>Any upper-level IS course, except IS 399, IS 400, IS 468, IS 469</p> <div id=\"section-info-row\" class=\"section-special-row\"> 	<div id=\"section-info-col1\"> 		</div> 	<div id=\"section-info-col2\"> 	</div> 	<div id=\"section-info-col3\"> 		Taken </div> <div id=\"section-info-col3\"> 	Grade </div> 	</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> 		7.  	</div> <div id=\"section-info-col2\">"

        #IS-C.10
        req_ids = ["IS 410", "IS 420", "IS 425", "IS 436", "IS 450", "IS 451", "IS 399", "IS 400", "IS 458", "IS 469"]
        IC10_IDS = []
        for i in range(300, 499):
            IC10_IDS.append("IS " + str(i))
        for i in range(0, len(req_ids)):
            if req_ids[i] in IC10_IDS:
                IC10_IDS.remove(req_ids[i])

        ic10_list = course_in_list(IC10_IDS, stud.get_courses())
            
        if len(ic10_list) > 0:
            src_string += ic10_list[0].get_id()
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ic10_list[0].get_grade()
        else:
            src_string += "______________"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        
 	
        src_string += "</div> 	</div> </div><!-- section end --> <div id=\"section\"><!-- section start --> 	<div id=\"section-title\">D. Required Math and Computer Science Courses</div> <p>Recommended preparation (not required) for Information Systems (B.S.) courses</p> <div id=\"section-info-row\" class=\"section-special-row\"> 	<div id=\"section-info-col1\"> 		</div> 	<div id=\"section-info-col2\"> 	</div> 	<div id=\"section-info-col3\"> 		Taken </div> <div id=\"section-info-col3\"> 	Grade </div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		1.  	</div> <div id=\"section-info-col2\"> 	MATH 215 - Finite Mathematics for Information Science </div> <div id=\"section-info-col3\">"
        #IS-D.1
        ID1_IDS = ["MATH 215"]
        id1_list = course_in_list(ID1_IDS, stud.get_courses())
        if len(id1_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += id1_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        
        src_string += "</div> 	</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> 	</div> <div id=\"section-info-col2\"> 	 OR </div> 	</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"></div> <div id=\"section-info-col2\"> 	MATH 221 - Linear Algebra </div> <div id=\"section-info-col3\">"
        #IS-D.2
        ID2_IDS = ["MATH 221"]
        id2_list = course_in_list(ID2_IDS, stud.get_courses())
        if len(id2_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += id2_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        
        src_string += "</div> 	</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> 		2.  	</div> <div id=\"section-info-col2\"> 	STAT 351 - Applied Statistics for Business and Economics </div> <div id=\"section-info-col3\">"
        #IS-D.3
        ID3_IDS = ["STAT 351"]
        id3_list = course_in_list(ID3_IDS, stud.get_courses())
        if len(id3_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += id3_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"


        
        src_string += "</div> 	</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> 		3.  	</div> <div id=\"section-info-col2\"> 	IS 247 - Computer Programming II </div> <div id=\"section-info-col3\">"
        #IS-D.4
        ID4_IDS = ["IS 247"]
        id4_list = course_in_list(ID4_IDS, stud.get_courses())
        if len(id4_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += id4_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        
        src_string += "</div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"></div> <div id=\"section-info-col2\"> 	OR </div> <div id=\"section-info-col3\"></div> <div id=\"section-info-col3\"></div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"></div> <div id=\"section-info-col2\"> 	CMSC 202 - Computer Science II </div> <div id=\"section-info-col3\">"
        #IS-D.5
        ID5_IDS = ["CMSC 202"]
        id5_list = course_in_list(ID5_IDS, stud.get_courses())
        if len(id5_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += id5_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"


        src_string += "</div> 	</div> <p>One additional semester of a programming language</p> <div id=\"section-info-row\" class=\"section-special-row\"> 	<div id=\"section-info-col1\"> 		</div> 	<div id=\"section-info-col2\"> 	</div> 	<div id=\"section-info-col3\"> 		Taken </div> <div id=\"section-info-col3\"> 	Grade </div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		4.  	</div> <div id=\"section-info-col2\">"

# NOT SURE HOW TO COMPLETE
 	src_string += "______________ </div> <div id=\"section-info-col3\"> 	-- </div> <div id=\"section-info-col3\"> -- </div>"
############################################################################

 	src_string += "</div> </div><!-- section end --> <div id=\"section\"><!-- section start --> 	<div id=\"section-title\">E. Required Administrative Science Courses</div> <div id=\"section-info-row\" class=\"section-special-row\"> 	<div id=\"section-info-col1\"> 		</div> 	<div id=\"section-info-col2\"> 	</div> 	<div id=\"section-info-col3\"> 		Taken </div> <div id=\"section-info-col3\"> 	Grade </div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		1.  	</div> <div id=\"section-info-col2\"> 	ECAD 210 - The Practice of Management </div> <div id=\"section-info-col3\">"
        #IS-E.1
        IE1_IDS = ["ECAD 210"]
        ie1_list = course_in_list(IE1_IDS, stud.get_courses())
        if len(ie1_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ie1_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        
        src_string += "</div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		2.  	</div> <div id=\"section-info-col2\"> 	ECON 101 - Principles of Economics I </div> <div id=\"section-info-col3\">"
        #IS-E.2
        IE2_IDS = ["ECON 101"]
        ie2_list = course_in_list(IE2_IDS, stud.get_courses())
        if len(ie2_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ie2_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        

        src_string += "</div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		3.  	</div> <div id=\"section-info-col2\"> 	ECON 102 - Principles of Economics II </div> <div id=\"section-info-col3\">"
        #IS-E.3
        IE3_IDS = ["ECON 102"]
        ie3_list = course_in_list(IE3_IDS, stud.get_courses())
        if len(ie3_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ie3_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        src_string += "</div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		4.  	</div> <div id=\"section-info-col2\"> 	ECON 121 - Principles of Accounting I </div> <div id=\"section-info-col3\">"
        #IS-E.4
        IE4_IDS = ["ECON 121"]
        ie4_list = course_in_list(IE4_IDS, stud.get_courses())
        if len(ie4_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ie4_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        src_string += "</div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		5.  	</div> <div id=\"section-info-col2\"> 	ECON 122 - Principles of Accounting II </div> <div id=\"section-info-col3\">"
        #IS-E.5
        IE5_IDS = ["ECON 122"]
        ie5_list = course_in_list(IE5_IDS, stud.get_courses())
        if len(ie5_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ie5_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        src_string += "</div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		6.  	</div> <div id=\"section-info-col2\"> 	ENGL 393 - Technical Writing </div> <div id=\"section-info-col3\">"
        #IS-E.6
        IE6_IDS = ["ENGL 393"]
        ie6_list = course_in_list(IE6_IDS, stud.get_courses())
        if len(ie6_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ie6_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        src_string += "</div> 	</div> </div><!-- section end --> <!-- IS MAJOR END -->"

    #COMPUTER SCIENCE MINOR (0:NONE, 1:CMSC (minor))
    if stud.get_minor() != 0:
        src_string += "<!-- CMSC MINOR START --> <h3>Computer Science Minor</h3> <p>Students who minor in computer science must complete 23 credits of course work that satisfies the following requirements.</p> <div id=\"section\"><!-- section start --> 	<div id=\"section-title\"> 	A. Core Courses (14 credits) </div> <div id=\"section-info-row\" class=\"section-special-row\"> 	<div id=\"section-info-col1\"> 		</div> 	<div id=\"section-info-col2\"> 	</div> 	<div id=\"section-info-col3\"> 		Taken </div> <div id=\"section-info-col3\"> 	Grade </div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		1.  	</div> <div id=\"section-info-col2\"> 	CMSC 201/201H - Computer Science I </div> <div id=\"section-info-col3\">"
        #CS Minor-A.1
        MA1_IDS = ["CMSC 201", "CMSC 201H"]
        ma1_list = course_in_list(MA1_IDS, stud.get_courses())
        if len(ma1_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ma1_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        
        src_string += "</div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		2.  	</div> <div id=\"section-info-col2\"> 	CMSC 202/202H - Computer Science II </div> <div id=\"section-info-col3\">"
        #CS Minor-A.2
        MA2_IDS = ["CMSC 202", "CMSC 202H"]
        ma2_list = course_in_list(MA2_IDS, stud.get_courses())
        if len(ma2_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ma2_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"


        src_string += "</div> 	</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> 		3.  	</div> <div id=\"section-info-col2\"> 	CMSC 203 - Discrete Structures </div> <div id=\"section-info-col3\">"
        #CS Minor-A.3
        MA3_IDS = ["CMSC 203"]
        ma3_list = course_in_list(MA3_IDS, stud.get_courses())
        if len(ma3_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ma3_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        src_string += "</div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"></div> <div id=\"section-info-col2\"> 	OR </div> <div id=\"section-info-col3\"></div> <div id=\"section-info-col3\"></div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"></div> <div id=\"section-info-col2\"> 	MATH 301 - </div> <div id=\"section-info-col3\">"
        #CS Minor-A.4
        MA4_IDS = ["MATH 301"]
        ma4_list = course_in_list(MA4_IDS, stud.get_courses())
        if len(ma4_list) > 0:
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += ma4_list[0].get_grade()
        else:
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"

        src_string += "</div> 	</div> </div><!-- section start --> <div id=\"section\"><!-- section start --> 	<div id=\"section-title\"> 	B. Three more courses (9 credits) </div> <p>One to three courses chosen with CMSC 4XX designation, except CMSC 404<br /> and CMSC 496-498</p> <div id=\"section-info-row\" class=\"section-special-row\"> 	<div id=\"section-info-col1\"> 		</div> 	<div id=\"section-info-col2\"> 	</div> 	<div id=\"section-info-col3\"> 		Taken </div> <div id=\"section-info-col3\"> 	Grade </div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		1.  	</div> <div id=\"section-info-col2\">"
        req_ids = ["CMSC 404", "CMSC 406", "CMSC 497", "CMSC 498"]
        MB_IDS = ["CMSC 313", "CMSC 331", "MATH 221"]
        for i in range(400, 499):
            MB_IDS.append("CMSC " + str(i))
        for i in range(0, len(req_ids)):
            if req_ids[i] in MB_IDS:
                MB_IDS.remove(req_ids[i])
        mb_list = course_in_list(MB_IDS, stud.get_courses())
        #M.B.1
        if len(mb_list) > 0:
            src_string += mb_list[0].get_id()
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += mb_list[0].get_grade()
        else:
            src_string += "______________"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        
        
        src_string += "</div> 	</div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"> 		2.  	</div> <div id=\"section-info-col2\">"
        #M.B.2
        if len(mb_list) > 1:
            src_string += mb_list[1].get_id()
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += mb_list[1].get_grade()
        else:
            src_string += "______________"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        src_string += "</div> 	</div> <div id=\"section-info-row\"> <div id=\"section-info-col1\"> 		3.  	</div> <div id=\"section-info-col2\">"
        #M.B.3
        if len(mb_list) > 2:
            src_string += mb_list[2].get_id()
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "Y"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += mb_list[2].get_grade()
        else:
            src_string += "______________"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
            src_string += "</div><div id=\"section-info-col3\">"
            src_string += "--"
        
        
        src_string += "</div> 	</div> <p></p> <div id=\"section-info-row\" class=\"section-special-row-3\"> <div id=\"section-info-col1\"></div> <div id=\"section-info-col2\">Two or fewer courses can be chosen from the list below:</div> <div id=\"section-info-col3\"></div> <div id=\"section-info-col3\"></div> </div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"></div> <div id=\"section-info-col2\">CMSC 313 - Computer Organization and Assembly Language</div> </div> <div id=\"section-info-row\"> 	<div id=\"section-info-col1\"></div> <div id=\"section-info-col2\">CMSC 331 - Programming Languages</div> </div><div id=\"section-info-row\"> 	<div id=\"section-info-col1\"></div> <div id=\"section-info-col2\">MATH 221 - Linear Algebra</div> </div> </div><!-- section start --> <!-- CMSC MINOR END -->"

    return src_string

'''
    construct_transcript()

    Given the student object, generates a html file providing information
    about the students courses and their grades, as well as a cumulative GPA.
    Returns a string containing html and css code.
'''
def construct_transcript(stud):
    src_string = "<!DOCTYPE html PUBLIC\"-//W3C//DTD XHTML 1.0 Transitional"
    src_string += "//EN\"\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona"
    src_string += "l.dtd\">"
    src_string += "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head><meta "
    src_string += "http-equiv=\"Content-Type\" content=\"text/html; charset="
    src_string += "utf-8\"/>"
    src_string += "<title>Transcript</title><!-- title of the page -->"
    src_string += "<style media=\"screen\" type=\"text/css\">"
    src_string += "#wrapall{margin: 0px auto;padding: 0px;width: 800px;}"
    src_string += "#header-wrap{float: left;clear: both;width: 800px;}"
    src_string += "#header-title{float: left;clear: both;width: 800px;"
    src_string += "margin-top: 10px;height: 30px;text-align: center;"
    src_string += "font-size: 20px;font-weight: bold;}#header-info{"
    src_string += "float: right;clear: both;width: 350px;margin-top: 20px;"
    src_string += "height: 80px;font-size: 16px;}#content{float: left;"
    src_string += "clear: both;width: 800px;margin-top: 50px;}"
    src_string += "#year{float: left;width: 760px;margin-left: 20px;"
    src_string += "margin-right: 20px;margin-bottom: 20px;background-color:"
    src_string += "#CCC;}#year-title{float: left;clear: both;width: 760px;"
    src_string += "text-align: center;font-weight: bold;font-size: 14px;}"
    src_string += "#year-title-2{float: left;clear: both;width: 760px;"
    src_string += "text-align: center;font-weight: bold;font-size: 12px;"
    src_string += "margin-top: 10px;}#year-info{float: left;clear: both;"
    src_string += "width: 760px;font-size: 14px;margin-top: 20px;}"
    src_string += "#year-info-row{float: left;clear: both;width: 760px;"
    src_string += "height: 20px;line-height: 20px;}.special-row{"
    src_string += "text-decoration: underline;	margin-bottom: 5px;}"
    src_string += ".special-row-2{margin-top: 20px;text-decoration: underline;"
    src_string += "margin-bottom: 5px;}#year-info-col1{float: left;"
    src_string += "clear: both;width: 100px;height: 20px;}#year-info-col2{"
    src_string += "float: left;width: 300px;height: 20px;}#year-info-col3{"
    src_string += "float: left;width: 100px;height: 20px;text-align: right;}"
    src_string += "</style>"
    src_string += "</head><body>"
    src_string += "<div id=\"wrapall\"><!-- wrappall start --><div id="
    src_string += "\"header-wrap\">"
    src_string += "<!-- header-wrap start --><div id=\"header-title\">"
    src_string += "<!-- header-title start -->Unofficial Transcript</div>"

    # here we will calculate the students GPA and total credits
    info = stud.get_student_info()
    gpa = info[0]
    total_creds = info[1]
    courses_taken = info[2]

    max_year = 0.0
    max_semester = 0.0
    if len(courses_taken) > 0:
        max_semester = float(courses_taken[0].get_semester())
        for i in range(1, len(courses_taken)):
            if courses_taken[i].get_semester() > max_semester:
                max_semester = courses_taken[i].get_semester()
        max_year = math.ceil((max_semester + 1.0) / 4.0)

    GRADES = {"A":4, "B":3, "C":2, "D":1, "F":0}
    SEMESTERS = {0:"Summer", 1:"Fall", 2:"Winter", 3:"Spring"}
    MAJORS = {0:"Computer Science", 1:"Information Systems", +
              2:"CS/IS Dual Major"}
	
    src_string += "<!-- header-title end --><div id=\"header-info\">"
    src_string += "<!--header-info start --><strong>Name:"
    src_string += "</strong>{0}<br/>".format(stud.get_name())
    src_string += "<strong>Major:</strong> {0}".format(MAJORS[stud.get_major()])
    src_string += "<br /><strong>Total Credits Earned:"
    src_string += "</strong> {0:.1f}".format(total_creds)
    src_string += "<br /><strong>GPA:</strong> {0:.2f}<br/></div>".format(gpa)
    src_string += "<!-- header-info end --></div><!-- header-wrap end -->"
    src_string += "<div id=\"content\"><!-- content start -->"
    src_string += "<!-- To add more years, copy all the way from here to #1-->"


	#Here, calculate all of the years we will need to add start a
	#for loop based upon the number of years
    for y in range(0, int(max_year)):
        src_string += "<div id=\"year\">"
        src_string += "<div id=\"year-title\">Year {0}</div>".format(str(y + 1))
        for s in range(0, 4):
            has_class = 0
            semester_idx = (y * 4) + s - 1
            #checks if the semester has a class
            for c in range(0, len(courses_taken)):
                if courses_taken[c].get_semester() == semester_idx:
                    has_class = 1
            #if semester has a class
            if has_class == 1:
                #add semester header
                src_string += "<div id=\"year-title-2\">{0} Semester</div>".format(SEMESTERS[s])
                src_string += "<div id=\"year-info\">"
                src_string += "<div id=\"year-info-row\" class=\"special-row\">"
                src_string += "<div id=\"year-info-col1\">Course</div>"
                src_string += "<div id=\"year-info-col2\">Description</div>"
                src_string += "<div id=\"year-info-col3\">Attempted</div>"
                src_string += "<div id=\"year-info-col3\">Earned</div>"
                src_string += "<div id=\"year-info-col3\">Grade</div></div>"
                #add semester classes
                for c in range(0, len(courses_taken)):
                    course_credits = GRADES[courses_taken[c].get_grade()] * courses_taken[c].get_credits()
                    if courses_taken[c].get_semester() == semester_idx:
                        src_string += "<div id=\"year-info-row\">"
                        src_string += "<div id=\"year-info-col1\">"
                        src_string += courses_taken[c].get_id()
                        src_string += "</div><div id=\"year-info-col2\">"
                        src_string += courses_taken[c].get_name()
                        src_string += "</div><div id=\"year-info-col3\">"
                        src_string += "{0:.1f}".format(courses_taken[c].get_credits())
                        src_string += "</div><div id=\"year-info-col3\">"
                        src_string += "{0:.1f}".format(course_credits)
                        src_string += "</div><div id=\"year-info-col3\">"
                        src_string += courses_taken[c].get_grade()
                        src_string += "</div></div>"
                src_string += "</div>"
        src_string += "</div>"
	

    src_string += "</div><!-- content end --></div><!-- wrappall end--></body>"
    src_string += "</html>"
    return src_string 


'''
    main()

    Function using when running the report_gen module
    as a standalone program for testing purposes.
'''
def main():
    print "Reading Student Information..."
    #filename = "/Users/Michael/Documents/College/CMSC/Software D&D/Project/TranscriptMaker/student_pickle"
    a_file = open("CSISCSM", "r")
    stdnt = pickle.load(a_file)
    a_file.close()
    print "Generating Unofficial Transcript..."
    export_transcript(stdnt, "TranscriptTest.html")
    print "Transcript Generated Successfully"
    print "Generating Degree Audit Report..."
    export_dars(stdnt, "DarsTest.html")
    print "Degree Audit Report Generated Successfully"

#main()
